<#include "../common/_blank.html"/> <@layout>

<script>
	$(function() {
		$("#password").keypress(function(e) {
			var key = e.which;
			if (key == 13) {
				login('${ldapEnabled?c}');
			}
		});
	});
</script>

<div class="container" style="margin-top: 40px;">
	<div class="row">
		<div class="col-md-12">

			<div style="margin: 0 auto; max-width: 400px;">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">Sign in <#if (ldapEnabled)>(use LDAP account)</#if></h3>
					</div>
					<div class="panel-body">
						<div class="form-sign" role="form">
							<div class="form-group">
								<input type="text" placeholder="name" id="name"
									class="form-control" required autofocus />
							</div>
							<div class="form-group">
								<input type="password" placeholder="password" id="password"
									class="form-control" required />
							</div>
							<button class="btn btn-primary btn-block" type="button" id="sign"
								onclick="login('${ldapEnabled?c}');">Sign in</button>
								
							<#if (!ldapEnabled)>
							<div style="margin-top: 10px">
								no account? <a href="/auth/register">sign up</a>
							</div>
							</#if>
							<input type="hidden" id="sig" value="${sig!}">
							<input type="hidden" id="callback" value="${callback!}">
						</div>
					</div>
				</div>
			</div>

		</div>
	</div>
</div>

</@layout>
